/* 
 * File:   DescriptorTest.cpp
 * Author: max
 *
 * Created on Apr 26, 2013, 10:49:30 PM
 */

#include <stdlib.h>
#include <iostream>
#include <vector>
#include "common_Descriptor.h"

using namespace TP;
/*
 * Simple C++ Test Suite
 */

void test1() {

    std::cout << "DescriptorTest test 1" << std::endl;

    Descriptor desc ('|');
    desc.parse ("CASA|PERRO|GATO|CANARIO");
    
    if (desc.data(0) != "CASA")
    {
        std::cout << "%TEST_FAILED% time=0 testname=test1 (DescriptorTest) message=el dato accedido no es el esperado (desc.data()[0] != casa)." << std::endl;
    } 
    else if (desc.data(1) != "PERRO")
    {
        std::cout << "%TEST_FAILED% time=0 testname=test1 (DescriptorTest) message=el dato accedido no es el esperado (desc.data()[1] != perro)." << std::endl;
    }
        
    
}

void test2() {
    std::cout << "DescriptorTest test 2" << std::endl;
    std::cout << "%TEST_FAILED% time=0 testname=test2 (DescriptorTest) message=error message sample" << std::endl;
}

int main(int argc, char** argv) {
    std::cout << "%SUITE_STARTING% DescriptorTest" << std::endl;
    std::cout << "%SUITE_STARTED%" << std::endl;

    std::cout << "%TEST_STARTED% test1 (DescriptorTest)" << std::endl;
    test1();
    std::cout << "%TEST_FINISHED% time=0 test1 (DescriptorTest)" << std::endl;
/*
    std::cout << "%TEST_STARTED% test2 (DescriptorTest)\n" << std::endl;
    test2();
    std::cout << "%TEST_FINISHED% time=0 test2 (DescriptorTest)" << std::endl;
*/
    std::cout << "%SUITE_FINISHED% time=0" << std::endl;

    return (EXIT_SUCCESS);
}

